# eric7.Plugins.VcsPlugins.vcsMercurial.ShelveBuiltin.HgShelveBrowserDialog

Module implementing Mercurial shelve browser dialog.

### Global Attributes

None

### Classes

HgShelveBrowserDialog | Class implementing Mercurial shelve browser dialog.

### Functions

None

## HgShelveBrowserDialog

Class implementing Mercurial shelve browser dialog.

### Derived from

QWidget, Ui_HgShelveBrowserDialog

### Class Attributes

AgeColumn
MessageColumn
NameColumn

### Class Methods

None

### Methods

HgShelveBrowserDialog | Constructor
__cleanupShelves | Private slot to delete all shelves.
__deleteShelves | Private slot to delete the selected shelves.
__finish | Private slot called when the process finished or the user pressed the button.
__generateShelveEntry | Private method to generate the shelve items.
__getShelveEntries | Private method to retrieve the list of shelves.
__processBuffer | Private method to process the buffered output of the hg shelve command.
__resetUI | Private method to reset the user interface.
__resizeColumnsShelves | Private method to resize the shelve list columns.
__showError | Private slot to show some error.
__unshelve | Private slot to restore the selected shelve of changes.
closeEvent | Protected slot implementing a close event handler.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
on_refreshButton_clicked | Private slot to refresh the list of shelves.
on_shelveList_currentItemChanged | Private slot called, when the current item of the shelve list changes.
on_shelveList_customContextMenuRequested | Private slot to show the context menu of the shelve list.
show | Public slot to show the dialog.
start | Public slot to start the hg shelve command.

### Static Methods

None

#### HgShelveBrowserDialog (Constructor)

HgShelveBrowserDialog(vcs, parent=None)

Constructor

vcs (Hg)
  reference to the vcs object
parent (QWidget)
  parent widget

#### HgShelveBrowserDialog.__cleanupShelves

__cleanupShelves()

Private slot to delete all shelves.

#### HgShelveBrowserDialog.__deleteShelves

__deleteShelves()

Private slot to delete the selected shelves.

#### HgShelveBrowserDialog.__finish

__finish()

Private slot called when the process finished or the user pressed the button.

#### HgShelveBrowserDialog.__generateShelveEntry

__generateShelveEntry(name, age, message, fileStatistics, totals)

Private method to generate the shelve items.

name (str)
  name of the shelve
age (str)
  age of the shelve
message (str)
  shelve message
fileStatistics (tuple of (str, str, str, str))
  per file change statistics (tuple containing the file name, the number of changes, the number of added lines and the number of deleted lines)
totals (tuple of (str, str, str))
  overall statistics (tuple containing the number of changed files, the number of added lines and the number of deleted lines)

#### HgShelveBrowserDialog.__getShelveEntries

__getShelveEntries()

Private method to retrieve the list of shelves.

#### HgShelveBrowserDialog.__processBuffer

__processBuffer()

Private method to process the buffered output of the hg shelve command.

#### HgShelveBrowserDialog.__resetUI

__resetUI()

Private method to reset the user interface.

#### HgShelveBrowserDialog.__resizeColumnsShelves

__resizeColumnsShelves()

Private method to resize the shelve list columns.

#### HgShelveBrowserDialog.__showError

__showError(out)

Private slot to show some error.

out (str)
  error to be shown

#### HgShelveBrowserDialog.__unshelve

__unshelve()

Private slot to restore the selected shelve of changes.

#### HgShelveBrowserDialog.closeEvent

closeEvent(e)

Protected slot implementing a close event handler.

e (QCloseEvent)
  close event

#### HgShelveBrowserDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button (QAbstractButton)
  button that was clicked

#### HgShelveBrowserDialog.on_refreshButton_clicked

on_refreshButton_clicked()

Private slot to refresh the list of shelves.

#### HgShelveBrowserDialog.on_shelveList_currentItemChanged

on_shelveList_currentItemChanged(current, _previous)

Private slot called, when the current item of the shelve list changes.

current (QTreeWidgetItem)
  reference to the new current item
_previous (QTreeWidgetItem)
  reference to the old current item (unused)

#### HgShelveBrowserDialog.on_shelveList_customContextMenuRequested

on_shelveList_customContextMenuRequested(pos)

Private slot to show the context menu of the shelve list.

pos (QPoint)
  position of the mouse pointer

#### HgShelveBrowserDialog.show

show()

Public slot to show the dialog.

#### HgShelveBrowserDialog.start

start()

Public slot to start the hg shelve command.

Up